import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni(),
    Components({
      dts: 'types/components.d.ts',
      dirs: ['src/components']
    }),
    AutoImport({
      dts: 'types/auto-imports.d.ts',
      imports: ['vue', 'uni-app'],
      dirs: ['src/consts']
    })
  ]
})
